package com.gdpu.project.dao;

import java.util.Date;
import java.util.List;

import com.gdpu.page.vo.QueryResult;
import com.gdpu.project.vo.CgProject;

public interface CgProjectDao {
	public abstract int count(String teacherId);
	
	public abstract List<CgProject> nfindByProperty(String propertyName, String value,Date begin,Date end);
	/**
	 * 项目分页查询
	 * @param propertyName
	 * @param value
	 * @param begin
	 * @param end
	 * @param firstindex
	 * @param maxresult
	 * @return
	 */
	public QueryResult<CgProject> nfindByProperty(String propertyName, List value,Date begin,Date end,int firstindex,int maxresult);
	public abstract void save(CgProject transientInstance);

	public abstract void delete(CgProject persistentInstance);

	public abstract CgProject findById(java.lang.Integer id);

	public abstract QueryResult<CgProject> findByExample(CgProject instance,int firstindex,int maxresult);
/**
 * 根据属性分页查找Cgproject
 * @param propertyName 属性名
 * @param value 属性值
 * @param firstindex 开始索引
 * @param maxresult 一页的记录数
 * @return QueryResult
 */
	public abstract QueryResult<CgProject> findByProperty(String propertyName,
			Object value,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByProjectId(Object projectId,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByProjectName(Object projectName,int firstindex,int maxresult);
/**
 * 根据教师编号分页查出Cgproject
 * @param teacherId
 * @param firstindex
 * @param maxresult
 * @return
 */
	public abstract QueryResult<CgProject> findByTeacherId(Object teacherId,int firstindex,int maxresult);
	/**
	 * 不分页根据教师编号查出所有Cgproject
	 * @param teacherId
	 * @return
	 */
	public abstract QueryResult<CgProject> findByTeacherId(Object teacherId);

	public abstract QueryResult<CgProject> findByProjectType(Object projectType,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByProjectOrigin(Object projectOrigin,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByProjectXz(Object projectXz,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByResearchType(Object researchType,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByFuZeRen(Object fuZeRen,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByKeYanFen(Object keYanFen,int firstindex,int maxresult);

	public abstract QueryResult<CgProject> findByComment(Object comment,int firstindex,int maxresult);
/**
 * 
 * @param firstindex 开始索引
 * @param maxresult 一页的最大记录数
 * @return	分页的QueryResult<CgProject>数据
 */
	public QueryResult<CgProject> findAll(int firstindex,int maxresult);
/**
 * 	
 * @return 不分页的QueryResult<CgProject>数据
 */
	public QueryResult<CgProject> findAll();

	public abstract CgProject merge(CgProject detachedInstance);

	public abstract void attachDirty(CgProject instance);

	public abstract void attachClean(CgProject instance);

}